import request from '@/utils/request'

// 创建证书记录
export function createCertificateRecord(data) {
  return request({
    url: '/exam/certificate-record/create',
    method: 'post',
    data: data
  })
}

// 更新证书记录
export function updateCertificateRecord(data) {
  return request({
    url: '/exam/certificate-record/update',
    method: 'put',
    data: data
  })
}

// 删除证书记录
export function deleteCertificateRecord(id) {
  return request({
    url: '/exam/certificate-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得证书记录
export function getCertificateRecord(id) {
  return request({
    url: '/exam/certificate-record/get?id=' + id,
    method: 'get'
  })
}

// 获得证书记录分页
export function getCertificateRecordPage(query) {
  return request({
    url: '/exam/certificate-record/page',
    method: 'get',
    params: query
  })
}

// 导出证书记录 Excel
export function exportCertificateRecordExcel(query) {
  return request({
    url: '/exam/certificate-record/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
